Skip to content

gh-93096: fix test_mimetypes.test_guess_type_conflicting_with_mimetypes#131408

Merged
hugovk merged 11 commits intopython:mainfrom
picnixz:fix/test/conflicting-mime-types-93096
Apr 8, 2025
Merged

gh-93096: fix test_mimetypes.test_guess_type_conflicting_with_mimetypes#131408
hugovk merged 11 commits intopython:mainfrom
picnixz:fix/test/conflicting-mime-types-93096

Conversation

@picnixz
Copy link
Member

@picnixz picnixz commented Mar 18, 2025

Using run_python_until_end() ignores setUpModule(). In particular, mocking mimetypes.knownfiles has no effect for the CLI tests and leads to issues on platforms defining non-standard MIME types such as macOS or openSUSE.

I think this was overlooked in #93097 and this may be the reason why finding the correct extension was tedious. Now, all platforms should support the test correctly (previously, the macOS files were still looked up as mimetypes.knownfiles was not unset for CLI tests).

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants